﻿<!--
//*****************************************************************************
//
//  Silver Games - Checkers
//  Copyright © 2009 Randi Relander
//      <rjrelander@users.sourceforge.net>
//
//  This program is free software: you can redistribute it and/or modify
//  it under the terms of the GNU General Public License as published by
//  the Free Software Foundation, either version 3 of the License, or
//  (at your option) any later version.
//
//  This program is distributed in the hope that it will be useful,
//  but WITHOUT ANY WARRANTY; without even the implied warranty of
//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
//  GNU General Public License for more details.
//
//  You should have received a copy of the GNU General Public License
//  along with this program.  If not, see <http://www.gnu.org/licenses/>.
//
//*****************************************************************************
-->

<UserControl x:Class="Checkers.Client.DialogTitleScreen"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:c="clr-namespace:Checkers.Client">
	<UserControl.Resources>
		<ResourceDictionary>
			<ResourceDictionary.MergedDictionaries>
				<ResourceDictionary Source="CheckersResources.xaml"/>
			</ResourceDictionary.MergedDictionaries>
		</ResourceDictionary>
	</UserControl.Resources>

    <Canvas x:Name="LayoutRoot" Background="Transparent" Width="640" Height="480">

        <Rectangle x:Name="mBackground" Stroke="#FF40FF00" Width="640" Height="480" StrokeThickness="0" RadiusX="12" RadiusY="12">
            <Rectangle.Fill>
                <LinearGradientBrush StartPoint="0.5,0" EndPoint="0.5,1">
                    <GradientStop Color="#FF000000" Offset="0"/>
                    <GradientStop Color="#FF30C000" Offset="1"/>
                </LinearGradientBrush>
            </Rectangle.Fill>
        </Rectangle>

        <Canvas>
            <c:Board>
                <c:Board.RenderTransform>
                    <TransformGroup>
                        <ScaleTransform ScaleX="2.3" ScaleY="1.8"/>
                        <TranslateTransform X="320" Y="512"/>
                    </TransformGroup>
                </c:Board.RenderTransform>
            </c:Board>
            <Canvas.Clip>
                <RectangleGeometry x:Name="mClip" RadiusX="12" RadiusY="12" Rect="0,0,640,480" />
            </Canvas.Clip>
        </Canvas>

        <Rectangle Width="640" Height="480" Fill="Transparent" RadiusX="12" RadiusY="12" />

        <StackPanel Margin="30">

            <TextBlock Text="Silver Games" FontSize="20" FontFamily="Verdana" 
                Margin="0,0,0,-8" Foreground="Silver"/>

            <TextBlock Text="Checkers" FontSize="60" FontWeight="Bold" FontFamily="Verdana" 
                Margin="0,0,0,0" Foreground="White" />

            <TextBlock Margin="0,0,0,20" FontSize="11" FontFamily="Verdana" x:Name="mCopyright" Text="[copyright]" Foreground="White"/>

            <Canvas>

                <Canvas.RenderTransform>
                    <ScaleTransform ScaleX="1.25" ScaleY="1.25"/>
                </Canvas.RenderTransform>
                
                <StackPanel>
                    <Button Style="{StaticResource ButtonStyle}" Margin="0,0,0,4" Width="90" Content="Start" x:Name="mStart"/>
                    <Button Style="{StaticResource ButtonStyle}" Margin="0,0,0,4" Width="90" Content="Credits" x:Name="mCredits"/>
                </StackPanel>
            
            </Canvas>

        </StackPanel>

        <Canvas.Resources>

        	<ResourceDictionary>
        		<ResourceDictionary.MergedDictionaries>
        			<ResourceDictionary Source="CheckersResources.xaml"/>
        		</ResourceDictionary.MergedDictionaries>

        		<Storyboard x:Name="mFadeInAnimation">
        			<DoubleAnimation Storyboard.TargetName="LayoutRoot"
        				Storyboard.TargetProperty="Opacity" From="0" To="1" Duration="0:0:0.25" />
        		</Storyboard>

        		<Storyboard x:Name="mFadeOutAnimation">
        			<DoubleAnimation Storyboard.TargetName="LayoutRoot"
        				Storyboard.TargetProperty="Opacity" From="1" To="0" Duration="0:0:0.25" />
        		</Storyboard>

        	</ResourceDictionary>

        </Canvas.Resources>

    </Canvas>

</UserControl>
